<?php

abstract class Log_Adapter
{
	abstract function write($mesasge, $level);

	function format($message, $level)
	{
		$str = date('Y-m-d H:i:s') . PHP_EOL;
		$str .= $level . PHP_EOL;
		$str .= $message . PHP_EOL . PHP_EOL;

		$str = str_replace(array(
			dirname(APP_ROOT_PATH) . DIRECTORY_SEPARATOR,
			dirname(SYSTEM_ROOT_PATH) . DIRECTORY_SEPARATOR
		), array(
			'',
			''
		), $str);

		return $str;
	}

}
